package com.example.demo.common.lbsgeo.pubsub;

import redis.clients.jedis.JedisPubSub;

/**
 * Created by li on 2016/4/16.
 */
public class PrintListener extends JedisPubSub{

    public void onMessage(String channel, String message) {
        System.out.println(channel+"渠道,消息:"+message);
        if(message.equalsIgnoreCase("quit")){
            this.unsubscribe(channel);
        }
    }

    public void onPMessage(String s, String s1, String s2) {

    }

    public void onSubscribe(String s, int i) {

    }

    public void onUnsubscribe(String s, int i) {

    }

    public void onPUnsubscribe(String s, int i) {

    }

    public void onPSubscribe(String s, int i) {

    }
}
